#include "udp_server.hpp"

int main(int argc, char* argv[])
{
  if(argc != 2)
  {
    std::cerr << "Usage: " << argv[0] << "port" << std::endl;
    return 1;
  }

  //std::string ip = "127.0.0.1";//此IP表示 本地环回 localhost
  int port = atoi(argv[1]);//字符串转为整数

  //UdpServer *svr = new UdpServer(ip, port);
  UdpServer *svr = new UdpServer(port);

  svr->InitUdpServer();
  svr->Start();

  return 0;
}
